package tester;

import entities.Range;
import entities.ServerInfo;

/**
 * classe de teste para o armazenamento e
 * carregamento do estado de uma estrutura
 * 
 * @author Leonardo Lino Nº45340
 * @author Diogo Pires Nº40351
 */
public class StateStoringTester {

	public static void main(String[] args) {
		ServerInfo server = new ServerInfo("127.0.0.1", 4000, 1);
		server.setBindName("dbServer1");
		server.setIdReplic(2);
		server.setIdCoordinator(3);
		server.setAvailable(true);
		server.setMainRange(new Range(1, 25, 1, 50));
		//server.setReplicRange(new Range(1, 25, 2, 50));
		//server.setCoordinatorRange(new Range(26, 50, 3, 50));
		
		String str = server.toString();
		System.out.println(str);
		System.out.println();
		
		ServerInfo server2 = new ServerInfo(str);
		System.out.println(server2);
	}

}
